#include "Sink.h"
// methodes


void Sink::Stop(void)
{
  halOutput->toggle_water_sink(false);
}

void Sink::drainWater(void){
  halOutput->toggle_water_sink(true);
  getCurrentWaterLevel();
  while((currentWaterLevel*33) > 0)
  {
    getCurrentWaterLevel();
  }
  
  halOutput->toggle_water_sink(false);
}

void Sink::getCurrentWaterLevel()
{
  halInput->update();
  currentWaterLevel = halInput->readWater();
}
